{extend name="public:base"/}
{block name="style"}

{/block}
{block name="main"}
  <form action="{:Url('admin/ruleinfo')}" method="POST"> 
    <input type="hidden" name="id" value="{$info['id']}">
    <div class="box-body">
      <div class="form-group">
        <label  class="col-sm-2 control-label">规则名称：</label>

        <div class="col-sm-10">
          <input type="text" name="name" class="form-control"  placeholder="请输入规则名称" value="{$info['name']}">
        </div>
      </div>
      <br>
      <div class="form-group">
        <label  class="col-sm-2 control-label">控制器名称：</label>

        <div class="col-sm-10">
          <input type="text" name="controller" class="form-control"  placeholder="请输入控制器名称" value="{$info['controller']}">
        </div>
      </div>
      <br>
      <div class="form-group">
        <label  class="col-sm-2 control-label">操作名称：</label>

        <div class="col-sm-10">
          <input type="text" name="action" class="form-control"  placeholder="请输入操作名称" value="{$info['action']}">
        </div>
      </div>
      <br>
      <div class="form-group">
        <label  class="col-sm-2 control-label">所属管理：</label>

        <div class="col-sm-10">
          <select class="form-control" name="groupid" id="groupid">
              {foreach $rulegroup as $v}
              <option value="{$v['id']}">{$v['name']}</option>
              {/foreach}
          </select>
          
        </div>
      </div>
      <br>
      
    </div>

    <div class="box-footer">
      <button class="btn btn-success pull-right" type="submit" id="oks">确定</button>
    </div>
  
  </form>

{notempty name="data['id']"}
<script type="text/javascript">
    $("#groupid").val({$info['groupid']});

</script>
{/notempty}
{/block}